import Vue from 'vue'
import Router from 'vue-router'
import Login from './views/login.vue'
import MainRouter from '@/views/main/routes';

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/login',
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    MainRouter,
    {
      path: '/404',
      component: () => import('@/views/error/404'),
      hidden: true
    },
    {
      path: '*',
      redirect: '/404'
    }
  ]
})
